Log in Register Dashboard Temp Share Shortlinks Frames API

cody - HTMLify profile

cody's Profile Picture

cody

4270 Files

633423 Views

Latest files of /cody/swapnilsparsh/30DaysOfJavaScript/56 - Jokes Chrome Extension

manifest.json cody/swapnilsparsh/30DaysOfJavaScript/56 - Jokes Chrome Extension/manifest.json
127 Views
0 Comments
{
"name":"Dad Jokes",
"version": "0.0.1",
"manifest_version": 2,
"browser_action":
{
"default_popup":"popup.html",
"default_icon":"sloth.png"
output_ss.PNG cody/swapnilsparsh/30DaysOfJavaScript/56 - Jokes Chrome Extension/output_ss.PNG
74 Views
0 Comments
Media file
sloth.png cody/swapnilsparsh/30DaysOfJavaScript/56 - Jokes Chrome Extension/sloth.png
139 Views
0 Comments
Media file
style.css cody/swapnilsparsh/30DaysOfJavaScript/56 - Jokes Chrome Extension/style.css
141 Views
0 Comments
body {
width: 300px;
height: 300px;
background-color: aliceblue;
display: flex;
justify-content: center;
}

popup.html cody/swapnilsparsh/30DaysOfJavaScript/56 - Jokes Chrome Extension/popup.html
337 Views
0 Comments
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<title> Dad Jokes </title>
script.js cody/swapnilsparsh/30DaysOfJavaScript/56 - Jokes Chrome Extension/script.js
193 Views
0 Comments
fetch('https://icanhazdadjoke.com/slack')
.then(data=> data.json())
.then(jokeData=> {
//var test=0;
const jokeText=jokeData.attachments[0].text;
const jokeid=document.getElementById('jokeid');
jokeid.innerHTML=jokeText;
})